

import { Component } from 'react';
import styled from 'styled-components';

const LayoutContainer = styled.div`
  width: 100vw;
  height: 100vh;
  display: flex;
  .left {
    flex: 2;
    background: lightblue;
  }
  .right {
    flex: 8;
    background: #ccc;
  }
`;

// 操作props
const withInputControl = (WrapperComponent:any) => {
  return class extends  Component {

    render() {
      return <LayoutContainer>
          <div className="left"></div>
          <div className="right">
            <WrapperComponent {...this.props} />
          </div>
      </LayoutContainer>
    }

  }
}

export default withInputControl;
